<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
<script>
  const person = {
    name: "jack",
    age: 21,
    language: ['java', 'js', 'css']
  }
  console.log(Object.keys(person));//["name", "age", "language"]
  console.log(Object.values(person));//["jack", 21, Array(3)]
  console.log(Object.entries(person));//[Array(2), Array(2), Array(2)]

  const target = { name: 'zhangsan' };
  const source1 = { age: 24 };
  const source2 = { gender: '男' };
  //Object.assign 方法的第一个参数是目标对象，后面的参数都是源对象。
  Object.assign(target, source1, source2);
  console.log(target)//{name: 'zhangsan', age: 24, gender: '男'}
</script>
</body>
</html>